<template>
	<view>

		<view class="data_tab">
			<view class="item" :class="tabIndex == index?'hover':''" v-for="(item,index) in tabData" :key="index"
				@click="clickTabs(index)">
				{{item}}
			</view>
		</view>

		<view class="arrive_title">
			学生到课情况
		</view>

		<view class="arrive_list">
			<view class="item">
				<image class="ico" src="../../static/ico_1.png" mode="widthFix"></image>
				<view class="name">
					到课
				</view>
				<view class="info">
					0
				</view>
			</view>
			<view class="item">
				<image class="ico" src="../../static/ico_2.png" mode="widthFix"></image>
				<view class="name">
					请假
				</view>
				<view class="info">
					0
				</view>
			</view>
			<view class="item">
				<image class="ico" src="../../static/ico_3.png" mode="widthFix"></image>
				<view class="name">
					未到
				</view>
				<view class="info">
					0
				</view>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				tabData: ['今日', '本周', '上周', '本月', '上月'],
				tabIndex: 0
			}
		},
		methods: {
			clickTabs(index) {
				this.tabIndex = index
			}
		}
	}
</script>

<style lang="scss" scoped>
	.arrive_title {
		padding: 0 40rpx;
		line-height: 40rpx;
		font-size: 28rpx;
		font-weight: 500;
		color: #3D3D3D;
	}

	.arrive_list {
		background: #fff;
		margin: 20rpx 40rpx;
		border-radius: 8rpx;

		.item {
			display: flex;
			align-items: center;
			height: 100rpx;
			padding: 0 20rpx;
			border-bottom: 2rpx solid rgba(230, 229, 231, 0.6);

			&:last-child {
				border: none;
			}

			.ico {
				flex-shrink: 0;
				width: 60rpx;
				height: 60rpx;
				margin-right: 20rpx;
			}

			.name {
				width: 100%;
				font-size: 28rpx;
				font-weight: 500;
				color: #3D3D3D;
				line-height: 40rpx;
			}

			.info {
				flex-shrink: 0;
				margin-left: 20rpx;
				padding-right: 6rpx;
				font-size: 28rpx;
				font-weight: 500;
				color: #3D3D3D;
				line-height: 40rpx;
			}
		}
	}

	.data_tab {
		margin: 20rpx 40rpx 40rpx;
		display: flex;
		align-items: center;
		justify-content: space-between;
		border: 2rpx solid #FF8535;
		border-radius: 8rpx;
		background: #fff;

		.item {
			width: 20%;
			box-sizing: border-box;
			text-align: center;
			line-height: 68rpx;
			text-align: center;
			border-right: 2rpx solid #FF8535;
			color: #FF8535;
			font-size: 28rpx;
			font-weight: 500;

			&:last-child {
				border: none;
			}

			&.hover {
				color: #fff;
				background: #FF8535;
			}
		}
	}
</style>